@import url("../../[branding]_components/dealerInteractiveMap.css");

/* Morrico tab � removes uppercase fallback (brand CSS sets --dim-tab-text-transform) */
.dealer-map__tab {
  text-transform: none;
}

.dealer-map__tab:not(.is-active) {
  border-bottom: 2px solid var(--brand) !important;
}

.dealer-map__tab:hover {
  font-family: var(--dimap-tab-active-font-family) !important;
}
 
/* Morrico active tab � brand font and weight */
.dealer-map__tab.is-active {
  font-family: var(--dimap-tab-active-font-family);
  font-weight: var(--dimap-tab-active-font-weight);
  padding-top: 16px;
}

/* Morrico select no uppercase */
.dealer-map__select {
  font-weight: var(--weight-semibold);
  text-transform: none;
  border: var(--dim-select-border);
  width: 100%;
  background-size: 16.62px !important;
  background-position: right 12px center !important;
}

/* Focused / active select state */
.dealer-map .dealer-map__select:focus,
.dealer-map .dealer-map__select:focus-visible,
.dealer-map .dealer-map__select:active {
  border: var(--dim-select-focus-border) !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Explicitly control the bottom border */
.dealer-map .dealer-map__select:focus,
.dealer-map .dealer-map__select:focus-visible,
.dealer-map .dealer-map__select:active {
  border-bottom: var(--dim-select-focus-border-bottom) !important;
}

/* Morrico helper � margin-right and margin-left auto */
.dealer-map__helper {
  font-weight: var(--weight-semibold);
  margin-left: auto !important;
  margin-right: auto !important;
}

.dealer-map__search-input {
  font-weight: var(--weight-semibold);
  border-right: 0;
}

.dealer-map__search-input::placeholder {
  color: var(--gray-dark-4);
}

.dealer-map__search-input:focus {
  border: var(--dim-search-focus-border-color);
}

/* Morrico search-clear � brand background color */
.dealer-map__search-clear {
  display: none;
  background: var(--dim-search-clear-color);
}

/* Morrico search clear svg � brand stroke color */
.dealer-map__search-clear svg {
  stroke: var(--dim-search-icon-color);
}

/* Morrico outline CTA hover � brand var border */
.dealer-map-card__cta--outline:hover {
  border: var(--dim-cta-outline-border-hover) !important;
}

.dealer-map__helper {
  margin-right: 0;
}

.dealer-map__tabs {
  padding: 0 200px;
  width: 100%;
}

/* Subaru — buttons fill the full width of dealer-map__tabs__border at all breakpoints */
.dealer-map__tabs__border {
  width: 100%;
  display: flex;
}

.dealer-map__tab {
  flex: 1;
  width: auto;
}
    
.dealer-map__control-group,
.dealer-map__search {
  flex: 1 1 0;
  width: auto;
}

.dealer-map-card__icon {
  stroke-width: 1;
  width: 28px;
  height: 28px;
}

.dealer-map-card__address,
.dealer-map-card__phone,
.dealer-map-card__email,
.dealer-map-card__hours-label {
  font-weight: var(--dim-card-info-font-weight);
  display: flex;
  align-items: center;
}

.dealer-map-card__address,
.dealer-map-card__hours-label {
  text-transform: uppercase !important;
}

.dealer-map__toolbar {
  background: var(--gray-dark-9);
  border-bottom: 1px solid var(--gray-dark-9);
}

@media (min-width: 1366px) {
   .dealer-map-card__title{
      margin-left: 52px !important;
   } 
}

/* Morrico � font-size reductions at wide desktop */
@media (max-width: 1366px) {
    .dealer-map-card__title {
      font-size: 24px;
    }

    .dealer-map-card__address,
    .dealer-map-card__phone,
    .dealer-map-card__email,
    .dealer-map-card__hours-label,
    .dealer-map-card__hours-detail {
      font-size: 18px;
    }

    .dealer-map-card__hours-row {
      font-size: 18px;
    }
    .dealer-map__controls {
      padding: 30px 14px;
      width: 100%;
    }
    .dealer-map__tabs {
      padding: 0 14px;
    }
    .dealer-map-card__cta {
      min-width: 193px;
      height: 60px;
    }

}

/* Morrico � tablet layout adjustments and font-size reductions */
@media (max-width: 768px) {
    .dealer-map__tabs {
      width: 100%;
    }

    .dealer-map__tabs__border {
      width: 100%;
      display: flex;
    }

    .dealer-map__tab {
      flex: 1;
      width: auto;
      font-size: 16px;
      padding-bottom: 0;
    }

    .dealer-map-card__title {
      font-size: 18px;
      text-align: center;
    }

    .dealer-map-card__address,
    .dealer-map-card__phone,
    .dealer-map-card__email,
    .dealer-map-card__hours-label,
    .dealer-map-card__hours-detail {
      font-size: 16px;
    }

    .dealer-map-card__hours-detail {
      margin-left: 52px;
    }

    .dealer-map-card__hours-row {
      font-size: 16px;
    }

    .dealer-map__map-container {
      width: 100vw;
      height: 350px;
    }

    .dealer-map__controls {
      padding: 30px 14px;
      flex-direction: row;
      align-items: start;
    }

    .dealer-map-card__footer {
      gap: 18px;
    }

    .dealer-map-card__cta {
      width: 475px;
      margin: 0 auto;
      height: 48px;
    }

    .dealer-map__panel {
      background: var(--brand-white);
    }

    
    .dealer-map-card__icon {
      stroke-width: 1;
      width: 24px;
      height: 24px;
    }
}

/* Morrico � mobile map height and font-size reductions */
@media (max-width: 576px) {
    .dealer-map-card__title {
      font-size: 18px;
      text-align: center;
    }

    .dealer-map-card__address,
    .dealer-map-card__phone,
    .dealer-map-card__email,
    .dealer-map-card__hours-label,
    .dealer-map-card__hours-detail {
      font-size: 16px;
    }

    .dealer-map-card__hours-row {
      font-size: 16px;
    }

    .dealer-map__map-container {
      height: 310px !important;
    }
    .dealer-map__controls {
      flex-direction: column;
    }

    .dealer-map__control-group,
    .dealer-map__search {
      width: 100%;
    }
    .dealer-map__tabs {
      padding: 0 14px;
    }
}
